<?php  
$arr = [
      'name' => 'Tom',
      'age'  => 20      
];
$json = json_encode($arr);
$array[] = $json;

var_dump($array);


